Skip to content

Add(CSS): translate / scale / rotate individual transform properties#423

Merged
1aron merged 2 commits intomaster-co:rcfrom
0Miles:feat/321-transform-individual-properties
May 3, 2026
Merged

Add(CSS): translate / scale / rotate individual transform properties#423
1aron merged 2 commits intomaster-co:rcfrom
0Miles:feat/321-transform-individual-properties

Conversation

@0Miles
Copy link
Copy Markdown
Contributor

@0Miles 0Miles commented Apr 30, 2026

Closes #321.

Summary

Adds the standalone CSS Transforms Module Level 2 properties (`translate`, `scale`, `rotate`) as native utilities. They compose with each other and with `transform:` per the spec, without the all-or-nothing override that `transform:` shorthand causes.

Changes

  • `packages/core/src/config/rules.ts` — three new `SyntaxRuleType.Native` rules with appropriate units (`translate: rem`, `rotate: deg`, `scale` unitless)
  • New `tests/issue-321-transform-individual.test.ts` — 7 cases including legacy `translate()`/`rotate()` function-form regression

Examples

```html

\`\`\`

Testing

  • 7/7 new tests pass; 109 core test files still pass
  • Real Chrome verification: `translate:16|24` → `getComputedStyle(...).translate === "16px 24px"`; `rotate:45deg` → `"45deg"`; `scale:1.5` → `"1.5"`

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

@0Miles is attempting to deploy a commit to the Aoyue Team on Vercel.

A member of the Team first needs to authorize it.

Adds the standalone CSS Transforms Module Level 2 properties as
native utilities. They compose with each other and with transform:
per the spec, without the all-or-nothing override that transform:
shorthand causes.

- Three new SyntaxRuleType.Native rules with appropriate units
  (translate: rem, rotate: deg, scale unitless)
- 7 test cases including legacy translate()/rotate() function-form
  regression
- Real Chrome verification: translate:16|24 →
  getComputedStyle(...).translate === "16px 24px"; rotate:45deg →
  "45deg"; scale:1.5 → "1.5"

Closes master-co#321
@0Miles 0Miles force-pushed the feat/321-transform-individual-properties branch from 1a1f616 to f94422a Compare April 30, 2026 19:04
@1aron 1aron merged commit c642653 into master-co:rc May 3, 2026
5 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

translate, scale:, rotate: shorthands for transform:

2 participants